<!-- side bar-->

<div class="col-md-2 col-xs-height navshadow">
    <ul class="nav nav-sidebar" >
        <div class="image">
            <img src="<?php echo base_url("public/images/sidebar_logo.jpg"); ?>" alt="logo_image" width="150px" height="150px" class="img-circle">
            <h3>Trung tâm</h3>
        </div>
        <?php
        foreach ($typeCenters as $value) {
            ?>
            <li class="<?php if ($idType == $value['id_type_center']) echo 'center-active' ?>"><a href="<?php echo base_url('index.php/website/center/type/' . $value['id_type_center']); ?>" ><?php echo $value['name_type']; ?></a>

                <?php
            }
            ?>

    </ul>
</div>
<!--Content  -->
<div class="col-md-10 col-xs-height" >    
    <div class="breadcrumbs" style="margin-top: 1%; margin-bottom: 1%;">
        <ul>
            <li><a href="<?php echo base_url("index.php/website/home"); ?>"><span class="glyphicon glyphicon-home"></span> Trang chủ</a></li>
            <li><a href="<?php echo base_url("index.php/website/center"); ?>"><span class="glyphicon glyphicon-file"></span> Tin Tức</a></li>
        </ul>
    </div>
    <div class="highlight">
        <div class="row">
            <h3><?= $center['name'] ?></h3>
            <p class="text-muted" style="font-size: 12px; font-weight: bold;">Ngày tạo: <?= date('H:i d/m/Y', strtotime($center['create_date'])); ?> Lượt xem: <?= $center['view'] ?></p>
            <hr>
        </div>
        <div class="row carousel-holder">
            <div class="col-md-12">
                <div id="carousel-example-generic" class="carousel slide" data-ride="carousel" style="height: 350px">
                    <ol class="carousel-indicators">
                        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
                    </ol>
                    <div class="carousel-inner" style="height: 350px">
                        <div class="item active">
                            <img class="slide-image" src="<?php echo base_url($images[0]['url_image']); ?>" alt="">
                            <div class="carousel-caption" style="margin-bottom: 10%;">
                                <h3><?php echo $images[0]['discription']; ?></h3>
                            </div>
                        </div>
                        <?php foreach ($images as $key): ?>
                            <div class="item">
                                <img class="slide-image" src="<?php echo base_url($key['url_image']); ?>" alt="">
                                <div class="carousel-caption" style="margin-bottom: 10%;">
                                    <h3><?php echo $key['discription']; ?></h3>
                                </div>
                            </div>
                        <?php endforeach ?>
                    </div>
                    <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
                        <span class="glyphicon glyphicon-chevron-left"></span>
                    </a>
                    <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
                        <span class="glyphicon glyphicon-chevron-right"></span>
                    </a>
                </div>
            </div>
        </div>
        <hr>
        <div class="row content">

            <div class="col-md-12" >
                <ul class="nav nav-tabs" role="tablist" id="myTab" >
                    <li class="active"><a href="#intro" data-toggle="tab">Giới thiệu</a></li>
                    <!--<li><a href="#addr" role="tab" data-toggle="tab">Vị trí trên bản đồ</a></li>-->
                    <li><a href="#contact" role="tab" data-toggle="tab">Liên hệ</a></li>
                    <!--<li ><a href="#admin" role="tab" data-toggle="tab">Người quản lý</a></li>-->
                    <li><a href="#comment" role="tab" data-toggle="tab">Nhận xét</a></li>
                </ul>

                <div class="tab-content" >
                    <!-- giới thiệu-->
                    <div class="tab-pane active" id="intro" >
                        <div class="col-md-12">
                            <p>
                                <?= $center['discription']; ?>
                            </p>

                        </div>
                    </div>
                    <!-- map địa chỉ -->
<!--                    <div class="tab-pane" id="addr">
                        <div class="col-md-12" style="margin-top: 2%;">
                            <div style="width: 100%; height: 100%;">
                                <?php echo $map['html']; ?>
                                <?php echo $map['js'] ?>
                            </div>
                        </div>
                    </div>-->
                    <!-- liên hệ--->
                    <div class="tab-pane" id="contact" style="margin-top: 2%;">
                        <div class="col-md-12">

                            <p>
                                <?= $center['contact']; ?>
                            </p>
                        </div>
                    </div>
                    <!-- Người quản lý -->
<!--                    <div class="tab-pane id="admin">
                         <div class="col-md-12" style="margin-top: 2%;">
                            <div class="col-md-2">
                                <a href="#"><img src="
                                    <?php
                                    if (!file_exists($center['url_image'])) {
                                        if ($center['id_sex'] == 1) {
                                            $center['url_image'] = 'public/images/defaut_user/default-user.jpg';
                                        } else {
                                            $center['url_image'] = 'public/images/defaut_user/default-user-female.jpg';
                                        }
                                    }
                                    echo base_url($center['url_image']);
                                    ?>" class="avatar"></a>
                            </div>
                            <div class="col-md-8">
                                <p class="name"><?= $center['first_name'] . ' ' . $center['last_name'] ?></p>
                                <p class="email"><?= $center['email']; ?></p>
                            </div>
                        </div>
                    </div>-->

                    <!---Nhận xét-->
                    <div class="tab-pane" id="comment">
                        <ul class="nav nav-tabs navbar-right" role="tablist" id="myTab">
                            <li class="active"><a href="#facebook" role="tab" data-toggle="tab">Facebook</a></li>
                            <li ><a href="#mapcenter" role="tab" data-toggle="tab">Trực tiếp</a></li>
                        </ul>
                        <div class="tab-content">

                            <div class="tab-pane active" id="facebook">
                                <div id="fb-root"></div>
                                <script>(function(d, s, id) {
                                        var js, fjs = d.getElementsByTagName(s)[0];
                                        if (d.getElementById(id))
                                            return;
                                        js = d.createElement(s);
                                        js.id = id;
                                        js.src = "//connect.facebook.net/vi_VN/sdk.js#xfbml=1&appId=1456817287931576&version=v2.0";
                                        fjs.parentNode.insertBefore(js, fjs);
                                    }(document, 'script', 'facebook-jssdk'));</script>
                                <div class="fb-comments" data-width="850" data-href="<?= base_url('index.php/website/center/loadById/' . $center['id_center']); ?>" data-numposts="5" data-colorscheme="light"></div>

                            </div>
                            <div class="tab-pane" id="mapcenter">

                            </div>
                        </div>
                    </div>
                </div>
            </div> 
        </div>
    </div>
</div>